<?php
$arr = getnews();
?>
<style>
   .b-faqpage__item{
    overflow: hidden;
    background-color: #f0f1f3;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
   }
   .b-faqpage__item-head{
    padding: 11px 46px 11px 20px;
    background-color: #fff;
    position: relative;
    cursor: pointer;
  }
  .b-faqpage__item.active .b-faqpage__item-head_label{color:#fff;}
  .b-faqpage__item-head_label{
    font-size: 16px;
    color: rgb(49,160,230);
    line-height: 1.5;
    text-transform: uppercase;
  }
  .b-faqpage__item-head_openclose{
    display: block;
    position: absolute;
    right: 14px;
    top: 50%;
    margin-top: -9px;
    width: 18px;
    height: 18px;
    background-color: rgb(49,160,230);
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
  }
  .b-faqpage__item-head_openclose:before {
    content: '';
    display: block;
    position: absolute;
    left: 4px;
    top: 8px;
    width: 10px;
    height: 2px;
    background-color: #fff;
  }
  .b-faqpage__item-head_openclose:after {
    content: '';
    display: block;
    position: absolute;
    left: 8px;
    top: 4px;
    width: 2px;
    height: 10px;
    background-color: #fff;
}
  .b-faqpage__item.active .b-faqpage__item-head{
    background-color: rgb(49,160,230);
  }
  .b-faqpage__item-head:hover{
    opacity: .9;
  }
  .b-faqpage{margin:0 auto;color:#23242e;font-size:12px;line-height:14px}
.b-faqpage__item{overflow:hidden;background-color:#f0f1f3;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}
.b-faqpage__item + .b-faqpage__item{margin-top:12px;}
.b-faqpage__item-body{display:none;padding:20px 0 16px 0;border:1px #fff solid;border-top:none;-webkit-border-bottom-right-radius:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-moz-border-radius-bottomleft:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px}
.b-faqpage__item.active .b-faqpage__item-body{display:block}
.b-faqpage__item-head{padding:11px 46px 11px 20px;background-color:#fff;position:relative;cursor:pointer}
.b-faqpage__item-head:hover{opacity:.9}
.b-faqpage__item-head_label{font-size:16px;color:rgb(49,160,230);line-height:1.5;text-transform:uppercase}
.b-faqpage__item-head_openclose{display:block;position:absolute;right:14px;top:50%;margin-top:-9px;width:18px;height:18px;background-color:rgb(49,160,230);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}
.b-faqpage__item-head_openclose:before{content:'';display:block;position:absolute;left:4px;top:8px;width:10px;height:2px;background-color:#fff}
.b-faqpage__item-head_openclose:after{content:'';display:block;position:absolute;left:8px;top:4px;width:2px;height:10px;background-color:#fff}
.b-faqpage__item.active .b-faqpage__item-head{background-color:rgb(49,160,230);}
.b-faqpage__item.active .b-faqpage__item-head_label{color:#fff}
.b-faqpage__item.active .b-faqpage__item-head_openclose{background-color:#fff}
.b-faqpage__item.active .b-faqpage__item-head_openclose:before{background-color:rgb(49,160,230)}
.b-faqpage__item.active .b-faqpage__item-head_openclose:after{display:none}
.b-faqpage__item.active .b-faqpage__item-head_openclose{background-color:#fff;}
</style>
<div class="b-page__wrapper">
    <div class="b-page__content">
        <div class="b-page__content-wrapper">
            <div class="b-faqpage">
                <?php
                foreach ($arr[1] as $k=>$v) {
                    ?>
                    <div class="b-faqpage__item">
                        <div class="b-faqpage__item-head">
                            <span class="b-faqpage__item-head_label"><?php echo $v['title'] ?>  <span class="b-faqpage__item-head_label"><?php echo date('Y-m-d',$v['art_time']); ?></span></span>
                            <span class="b-faqpage__item-head_openclose"></span>
                        </div>
                        <div class="b-faqpage__item-body" style="padding:10px;font-size: 13px;">
                            <p>
                                <?php echo $v['content'] ?>
                            </p>
                        </div>
                    </div>
                <?php } ?>


            </div>
            <script> $(document).ready(function () {
                    $(document).on('click', '.b-faqpage__item-head', function () {
                        $(this).parents('.b-faqpage__item').toggleClass('active');
                    });
                });
            </script>
        </div>